package co.yixiang.modules.shop.service.impl;

import co.yixiang.common.service.impl.BaseServiceImpl;
import co.yixiang.modules.shop.entity.YxInfo;
import co.yixiang.modules.shop.mapper.YxInfoMapper;
import co.yixiang.modules.shop.service.YxInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * <p>
 * 走进海铂表 服务实现类
 * </p>
 *
 * @author hisen
 * @since 2019-10-02
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class YxInfoServiceImpl extends BaseServiceImpl<YxInfoMapper, YxInfo> implements YxInfoService {

    @Autowired
    private YxInfoMapper yxInfoMapper;
    @Override
    public List<YxInfo> getYxInfoList() {
        return yxInfoMapper.getYxInfoList();
    }

    @Override
    public YxInfo getYxInfoDetail(int id) {
        QueryWrapper<YxInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("id", id);
        return yxInfoMapper.selectOne(wrapper);

    }


}
